package org.dreamwork.jasmine2.restful;

/**
 * Created with IntelliJ IDEA.
 * User: seth.yang
 * Date: 14-11-17
 * Time: 下午4:50
 */
public enum MethodType {
    GET, POST, PUT, HEAD, DELETE, TRACE, CONNECT;

    public static MethodType parse (String text) {
        for (MethodType type : values ()) {
            if (type.name ().equalsIgnoreCase (text)) {
                return type;
            }
        }

        return null;
    }
}